package reduce.fz.com.reduce.util;

import android.content.Context;

import reduce.fz.com.reduce.service.FindService;
import reduce.fz.com.reduce.service.NoticeService;
import reduce.fz.com.reduce.service.PkService;
import reduce.fz.com.reduce.service.SocietyService;
import reduce.fz.com.reduce.service.StoryService;
import reduce.fz.com.reduce.service.StsService;
import reduce.fz.com.reduce.service.TeamService;
import reduce.fz.com.reduce.service.UserService;
import reduce.fz.com.reduce.service.VideoService;
import reduce.fz.com.reduce.service.WitnessService;

/**
 * Created by qingshengzheng on 15/7/26.
 */
public class ServiceBuilder {
    private static FindService findService;
    private static UserService userService;
    private static StoryService storyService;
    private static TeamService teamService;
    private static WitnessService witnessService;
    private static StsService stsService;
    private static VideoService videoService;
    private static PkService pkService;
    private static SocietyService societyService;
    private static NoticeService noticeService;

    public static NoticeService builderNoticeService(Context context) {
        if (noticeService == null)
            noticeService = new NoticeService(context);
        return noticeService;
    }


    public static SocietyService builderSocietyService(Context context) {
        if (societyService == null)
            societyService = new SocietyService(context);
        return societyService;
    }

    public static PkService builderPkService(Context context) {
        if (pkService == null)
            pkService = new PkService(context);
        return pkService;
    }

    public static FindService builderFindService(Context context) {
        if (findService == null)
            findService = new FindService(context);
        return findService;
    }

    public static VideoService builderVideoService(Context context) {
        if (videoService == null)
            videoService = new VideoService(context);
        return videoService;
    }


    public static WitnessService builderWitnessService(Context context) {
        if (witnessService == null)
            witnessService = new WitnessService(context);
        return witnessService;
    }

    public static UserService builderUserService(Context context) {
        if (userService == null)
            userService = new UserService(context);
        return userService;
    }

    public static StoryService builderStoryService(Context context) {
        if (storyService == null)
            storyService = new StoryService(context);
        return storyService;
    }

    public static TeamService builderTeamService(Context context) {
        if (teamService == null)
            teamService = new TeamService(context);
        return teamService;
    }

    public static StsService builderStsService(Context context) {
        if (stsService == null)
            stsService = new StsService(context);
        return stsService;
    }
}
